Integrand size = 29, antiderivative size = 76 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))}{a+b \sec (e+f x)} \, dx=\frac {d \text {arctanh}(\sin (e+f x))}{b f}+\frac {2 (b c-a d) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} b \sqrt {a+b} f} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {4083, 3855, 3916, 2738, 214} \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))}{a+b \sec (e+f x)} \, dx=\frac {2 (b c-a d) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{b f \sqrt {a-b} \sqrt {a+b}}+\frac {d \text {arctanh}(\sin (e+f x))}{b f} \]
[In]
[Out]
Rule 214
Rule 2738
Rule 3855
Rule 3916
Rule 4083
Rubi steps \begin{align*} \text {integral}& = \frac {d \int \sec (e+f x) \, dx}{b}+\frac {(b c-a d) \int \frac {\sec (e+f x)}{a+b \sec (e+f x)} \, dx}{b} \\ & = \frac {d \text {arctanh}(\sin (e+f x))}{b f}+\frac {(b c-a d) \int \frac {1}{1+\frac {a \cos (e+f x)}{b}} \, dx}{b^2} \\ & = \frac {d \text {arctanh}(\sin (e+f x))}{b f}+\frac {(2 (b c-a d)) \text {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tan \left (\frac {1}{2} (e+f x)\right )\right )}{b^2 f} \\ & = \frac {d \text {arctanh}(\sin (e+f x))}{b f}+\frac {2 (b c-a d) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} b \sqrt {a+b} f} \\ \end{align*}
Time = 0.44 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.47 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))}{a+b \sec (e+f x)} \, dx=\frac {\frac {2 (-b c+a d) \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+d \left (-\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )+\log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )\right )}{b f} \]
[In]
[Out]
Time = 0.74 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.21
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (a d -b c \right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{b}-\frac {d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{b}}{f}\) | \(92\) |
default | \(\frac {-\frac {2 \left (a d -b c \right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{b}-\frac {d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{b}}{f}\) | \(92\) |
risch | \(\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {-i a^{2}+i b^{2}+b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right ) a d}{\sqrt {a^{2}-b^{2}}\, f b}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {-i a^{2}+i b^{2}+b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right ) c}{\sqrt {a^{2}-b^{2}}\, f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a^{2}-i b^{2}+b \sqrt {a^{2}-b^{2}}}{\sqrt {a^{2}-b^{2}}\, a}\right ) a d}{\sqrt {a^{2}-b^{2}}\, f b}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a^{2}-i b^{2}+b \sqrt {a^{2}-b^{2}}}{\sqrt {a^{2}-b^{2}}\, a}\right ) c}{\sqrt {a^{2}-b^{2}}\, f}+\frac {d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{b f}-\frac {d \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{b f}\) | \(327\) |
[In]
[Out]
none
Time = 0.57 (sec) , antiderivative size = 309, normalized size of antiderivative = 4.07 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))}{a+b \sec (e+f x)} \, dx=\left [\frac {{\left (a^{2} - b^{2}\right )} d \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (a^{2} - b^{2}\right )} d \log \left (-\sin \left (f x + e\right ) + 1\right ) - \sqrt {a^{2} - b^{2}} {\left (b c - a d\right )} \log \left (\frac {2 \, a b \cos \left (f x + e\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (f x + e\right ) + a\right )} \sin \left (f x + e\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (f x + e\right )^{2} + 2 \, a b \cos \left (f x + e\right ) + b^{2}}\right )}{2 \, {\left (a^{2} b - b^{3}\right )} f}, \frac {{\left (a^{2} - b^{2}\right )} d \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (a^{2} - b^{2}\right )} d \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, \sqrt {-a^{2} + b^{2}} {\left (b c - a d\right )} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (f x + e\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (f x + e\right )}\right )}{2 \, {\left (a^{2} b - b^{3}\right )} f}\right ] \]
[In]
[Out]
\[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))}{a+b \sec (e+f x)} \, dx=\int \frac {\left (c + d \sec {\left (e + f x \right )}\right ) \sec {\left (e + f x \right )}}{a + b \sec {\left (e + f x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))}{a+b \sec (e+f x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.67 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))}{a+b \sec (e+f x)} \, dx=\frac {\frac {d \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{b} - \frac {d \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{b} - \frac {2 \, {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a - 2 \, b\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )} {\left (b c - a d\right )}}{\sqrt {-a^{2} + b^{2}} b}}{f} \]
[In]
[Out]
Time = 14.62 (sec) , antiderivative size = 571, normalized size of antiderivative = 7.51 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))}{a+b \sec (e+f x)} \, dx=\frac {b^2\,c\,\ln \left (\frac {b\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )-a\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )+\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\sqrt {a^2-b^2}}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f\,{\left (a^2-b^2\right )}^{3/2}}-\frac {a^2\,c\,\ln \left (\frac {b\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )-a\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )+\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\sqrt {a^2-b^2}}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f\,{\left (a^2-b^2\right )}^{3/2}}-\frac {2\,b\,d\,\mathrm {atanh}\left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f\,\left (a^2-b^2\right )}+\frac {c\,\ln \left (\frac {a\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )+b\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )+\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\sqrt {a^2-b^2}}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )\,\sqrt {\left (a+b\right )\,\left (a-b\right )}}{f\,\left (a^2-b^2\right )}-\frac {a\,b\,d\,\ln \left (\frac {b\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )-a\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )+\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\sqrt {a^2-b^2}}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f\,{\left (a^2-b^2\right )}^{3/2}}+\frac {2\,a^2\,d\,\mathrm {atanh}\left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{b\,f\,\left (a^2-b^2\right )}+\frac {a^3\,d\,\ln \left (\frac {b\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )-a\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )+\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\sqrt {a^2-b^2}}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{b\,f\,{\left (a^2-b^2\right )}^{3/2}}-\frac {a\,d\,\ln \left (\frac {a\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )+b\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )+\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\sqrt {a^2-b^2}}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )\,\sqrt {\left (a+b\right )\,\left (a-b\right )}}{b\,f\,\left (a^2-b^2\right )} \]
[In]
[Out]